#pragma once

#include "TileBoard.h"
#include "ClientSettings.h"

class BoardManager
{
	TileBoard* mBoard[ClientSettings::BOARD_NLINES][ClientSettings::BOARD_NCOLS];
	HFONT mFont;

public:
	BoardManager();
	~BoardManager(void);

	DWORD getArrayCoordsFromPoint(int _x, int _y);
	TileBoard* getTileFromCoords(int _line, int _col);

	void Render(HDC _surface);

	void Reset();

	void PlaceLetter(UINT _line, UINT _col, char _letter);
	void ResetPosition(UINT _line, UINT _col);
	void LockLine(UINT _line);

	bool IsLineEmpty(UINT _line);
	bool TileHasEmptyNeighbour(TileBoard* _tile);
	bool TileHasFilledNeighbour(TileBoard* _tile);
};

